home *** CD-ROM | disk | FTP | other *** search
- #include <VecSimple_Point.h>
- int main()
- {
- const int n = 6;
- VecSimple(Point) p(n); // allocates a Point vector with 6 entries
- for (int i = 1; i <= n; i++)
- p(i).x = p(i).y = p(i).z = 2*i; // subscripting:
- VecSimple(Point) u(n); u = p;
- s_o << "Here is our Point vector (u):\n" << u << '\n';
- p.redim (3); // redimension p: new length = 3
- s_o << "\np again, this time uninitialized:\n" << p << '\n';
- return 0;
- }
-